# loc/personal_center_page_locators.py
from selenium.webdriver.common.by import By


class PersonalCenterPageLocators:
    """个人中心页面元素定位器"""
    # 子菜单
    SUB_MENU_MY_FINANCE = (By.XPATH, '/html/body/div/div/aside/div[2]/nav/ul/li[4]/ul/li[1]/a')
    SUB_MENU_MY_LOANS = (By.XPATH, '/html/body/div/div/aside/div[2]/nav/ul/li[4]/ul/li[2]/a')
    SUB_MENU_BANK_CARDS = (By.XPATH, '/html/body/div/div/aside/div[2]/nav/ul/li[4]/ul/li[3]/a')

    # 银行卡页面
    ADD_BANK_CARD_MODAL_BUTTON = (By.ID, 'bankCard_add_modal_btn')
    BANK_NAME_INPUT = (By.ID, 'cardBank_add_input')
    CARD_NUMBER_INPUT = (By.ID, 'cardNum_add_input')
    SAVE_BANK_CARD_BUTTON = (By.ID, 'bankCard_save_btn')

    # 用于断言
    ADD_CARD_SUCCESS_MESSAGE = (By.XPATH, '...')  # 假设有添加成功的提示信息
    LATEST_CARD_NUMBER = (By.XPATH, '//table/tbody/tr[1]/td[2]')  # 假设列表第一行第二列是最新卡号